//
//  SocketDataHandle.h
//  Karaoke
//
//  Created by Jiang Haofeng on 12-7-29.
//  Copyright (c) 2012年 Jiang Haofeng. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "MenuObject.h"
#import "RoomStateAndInfo.h"
#import "OKFolioObject.h"
#import "ReportObject.h"
#import "TVRelayObject.h"
#import "TiaoGuangStateObject.h"
#import "RoomStatesObject.h"

#define OEM_FLAG 0
#define ShowType @"4"
#define ROOMTYPE @"1"

@class SocketDataHandle;

@protocol SocketDataHandleDelegate <NSObject>

@optional

- (void)UpdateDB:(NSURL *)DBUrl dbVersion:(NSString *)dbVersion;
- (void)DbExist;

- (void)socketDataHandle:(SocketDataHandle *)socketHanler serverConnect:(BOOL)serverConnect;
- (void)socketDataHandle:(SocketDataHandle *)dateHandle clientConnected:(BOOL)clientConnected;
- (void)socketDataHandle:(SocketDataHandle *)dateHandle boundClient:(NSArray *)tempArray;

// 点单部分

- (void)socketDataHandleDidConfirmInputAmount;

- (void)socketDataHandleDidCategory:(NSMutableDictionary *)categoryDict;
- (void)socketDataHandleDidFoodList:(NSArray *)foodList;
- (void)socketDataHandleDidRoomStateAndInfo:(RoomStateAndInfo *)roomStateInfo;
- (void)socketDataHandleDidAddInfoOfFood:(NSArray *)addInfoDict;
- (void)socketDataHandleDidSelectFood:(NSArray *)foods;
- (void)socketDataHandleDidPackChild:(NSDictionary *)childs packCount:(NSInteger)packCount packChildArray:(NSArray *)packChildArray;
- (void)socketDataHandleDidAutoFreeFood:(NSMutableDictionary *)packDict packCount:(NSInteger)count;
- (void)socketDataHandleDidConfirmInputFood:(NSString *)errorMsg;

- (void)socketDataHandleDidControlChenged;

- (void)socketDataHandleDidUpdateBillList;

// 工作报告
- (void)socketDataHandleDidRoomReport:(ReportObject *)report;

- (void)socketDataHandleDidSaveRoomReport;

// 大厅点单

- (void)socketDataHandleDidHallBound:(BOOL)isBound errorMsg:(NSString *)errorMsg;

// 电视转播
- (void)socketDataHandleDidDianShiPinDao:(NSMutableArray *)pinDaoArray;

// 公关

- (void)socketDataHandleDidGongGuanList:(NSMutableArray *)gongGuanArray;

// 灯光

- (void)socketDataHandleDidDengGuang;

// 调音
- (void)socketDataHandleDidTiaoYin;

- (void)socketDataHandleDidRoomStates:(RoomStatesObject*)obj;

-(void)socketDataHandleDidLoginSucceed;
@end

@interface SocketDataHandle : NSObject

+ (SocketDataHandle *)sharedInstance;

@property (assign, nonatomic) id <SocketDataHandleDelegate> delegate;
@property (strong, nonatomic) OKSelectFoodObject            *tmpSelectFood;
@property (nonatomic, assign) NSInteger                     Amount;
@property (nonatomic, strong) NSString                      *addInfo;
@property (strong, nonatomic) RoomStateAndInfo              *roomState;
@property (strong, nonatomic) ReportObject                  *reportObj;

// control state

@property (assign, nonatomic) BOOL      isControlVol;
@property (assign, nonatomic) BOOL      isOriginalMusic; // YES = 原唱 ／／NO = 伴唱 for btnStero
@property (assign, nonatomic) BOOL      isMute;
@property (assign, nonatomic) BOOL      isPlaying;
@property (assign, nonatomic) int       currentVol;
@property (assign, nonatomic) float     volMax, micMax, effMax;
@property (strong, nonatomic) NSString  *volValue, *huaTongVol, *hunXiangVol, *effMode,*sysDate;
@property (strong, nonatomic) NSString  *loginID, *loginPwd;

@property (strong, nonatomic) NSMutableArray *tempRoomArray;

@end